<!--
 * @Description: 多选测试
 * @Author: yyang
 * @Date: 2023-04-30 21:58:01
 * @LastEditTime: 2023-08-05 16:56:43
 * @LastEditors: yyang
-->
<script setup lang="ts">
import FullCheck from "@/components/Form/fullCheck.vue";
import { ref } from "vue";
const groupChecked = ref<any[]>([]);

const arr = [
	{ name: "选项1", key: 1 },
	{ name: "选项2", key: 2 },
	{ name: "选项3", key: 3 },
];

const onsubmit = function (e: object) {
	console.log(e,groupChecked.value);
};
</script>
<template>
	<van-form @submit="onsubmit">
		<!-- <van-field
			required
			:rules="[{ required: true, message: '111' }]"
			name="checkboxGroup"
			label="复选框组">
			<template #input>
				<van-checkbox-group v-model="groupChecked" direction="horizontal">
					<van-checkbox name="1" shape="square">复选框 1</van-checkbox>
					<van-checkbox name="2" shape="square">复选框 2</van-checkbox>
				</van-checkbox-group>
			</template>
		</van-field> -->
		<div style="margin: 16px">
			<full-check v-model="groupChecked" :checkedDatas="arr"> </full-check>
			<van-button round block type="primary" native-type="submit"> 提交 </van-button>
		</div>
	</van-form>
</template>
<style lang="scss" scoped></style>
